from WebBackend.dataclass.Configuration import ConfigurationItem

ANONYMOUS_OPTIONS: list[ConfigurationItem] = [
    {
        "key": "anonymous_enable",
        "description": "允许匿名登录（必须启用）",
        "default": 'YES',
        "recommended": 'YES'
    },
    {
        "key": "anon_root",
        "description": "匿名用户的根目录",
        "default": '/srv/ftp',
        "recommended": "/srv/ftp"
    },
    {
        "key": "no_anon_password",
        "description": "匿名登录不需要密码（直接回车）",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "anon_upload_enable",
        "description": "允许匿名用户上传文件",
        "default": 'NO',
        "recommended": 'NO'
    },
    {
        "key": "anon_mkdir_write_enable",
        "description": "允许匿名用户创建目录",
        "default": 'NO',
        "recommended": 'NO'
    },
    {
        "key": "anon_other_write_enable",
        "description": "允许匿名用户其他写操作（重命名/删除等）",
        "default": 'NO',
        "recommended": 'NO'
    },
    {
        "key": "anon_world_readable_only",
        "description": "仅允许下载全局可读文件（安全建议）",
        "default": 'YES',
        "recommended": 'YES'
    },
    {
        "key": "anon_max_rate",
        "description": "匿名用户最大传输速率（字节/秒）",
        "default": 0,
        "recommended": "如：102400（100KB/s）"
    },
    {
        "key": "anon_umask",
        "description": "匿名用户上传文件的umask值",
        "default": "077",
        "recommended": "077"
    },
    {
        "key": "chown_uploads",
        "description": "匿名上传文件自动修改所有者",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "chown_username",
        "description": "匿名上传文件的所有者（需配合chown_uploads）",
        "default": "root",
        "recommended": "专用用户（如ftpadmin）"
    },
    {
        "key": "hide_ids",
        "description": "目录列表中显示的用户/组名为ftp",
        "default": 'NO',
        "recommended": 'YES'
    }
]